diff -Naur opencomal-0.2.6/src/pdccmd.c opencomal-0.2.6.patched/src/pdccmd.c
--- opencomal-0.2.6/src/pdccmd.c	2017-12-10 17:36:56.144207669 -0500
+++ opencomal-0.2.6.patched/src/pdccmd.c	2017-12-10 17:37:14.539207700 -0500
@@ -260,9 +260,11 @@
 
 		aline = crunch_line(buf);
 
-		direct_cmd = !aline->ld;
-		result = process_comal_line(aline);
-		nr += step;
+		if(aline) {
+			direct_cmd = !aline->ld;
+			result = process_comal_line(aline);
+			nr += step;
+		}
 	}
 
 	return result;
